package com.ruoyi.web.controller.api.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.springframework.boot.context.properties.ConstructorBinding;
import org.springframework.context.annotation.Bean;

import java.util.List;


@AllArgsConstructor
@NoArgsConstructor
@Getter
@Setter
public class RequestPayload {
    private String query;

    @JsonProperty("knowledge_base_name")
    private String knowledgeBaseName;

    private int topK;

    @JsonProperty("score_threshold")
    private int scoreThreshold;

    private List<HistoryItem> history;
    private boolean stream;

    @JsonProperty("model_name")
    private String modelName;

    private double temperature;

    @JsonProperty("max_tokens")
    private int maxTokens;

    @JsonProperty("prompt_name")
    private String promptName;

    // getters and setters


    @AllArgsConstructor
    @NoArgsConstructor
    @Getter
    @Setter
    public static class HistoryItem {
        private String role;
        private String content;

        // getters and setters
    }
}
